#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: twl
@date: 2022/5/9 11:03
@description:
"""
import logging

from config import BaseConfig


# beta测试配置


class BetaConfig(BaseConfig):
    NACOS_SERVER_ADDRESSES = '172.20.155.54:8848'
    NACOS_NAMESPACE = '30ede9cd-2087-4cdf-b341-f1e26fa52182'
    NACOS_GROUP = 'COOCAA_PROACTIVE_SERVICE'
    '''
    服务注册组
    '''
    SERVICE_REGISTER_GROUP = 'PROACTIVE_SERVICE_BETA'
    DEBUG = True
    HOST = "172.20.154.103"
    PORT = "3307"
    DB = "proactive_service_data"
    USER = "test_dmp"
    PASS = "DghHC3lFM1KzT3ZJ"
    DB_URI = "mysql+pymysql://{}:{}@{}:{}/{}?charset={}".format(
        USER, PASS, HOST, PORT, DB, BaseConfig.CHARSET)
    # 如果设置成 True (默认情况)，Flask-SQLAlchemy 将会追踪对象的修改并且发送信号。这需要额外的内存， 如果不必要的可以禁用它
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    # 如果设置成 True，SQLAlchemy 将会记录所有 发到标准输出(stderr)的语句，这对调试很有帮助
    SQLALCHEMY_ECHO = False
    SQLALCHEMY_POOL_TIMEOUT = 30
    SQLALCHEMY_POOL_SIZE = 20
    SQLALCHEMY_POOL_RECYCLE = 60
    SQLALCHEMY_DATABASE_URI = DB_URI

    LOG_LEVEL = logging.INFO
    LOG_FILE = './log.log'

    HIVE_HOST = "192.168.1.88"
    HIVE_PORT = 10000
    HIVE_USER = "lifeservice"
    HIVE_PASSWORD = "HnJs8OiOQX"
    # HIVE_DATABASE = "coocaa_rds"
    # HIVE_TABLE = "rds_zdfw_sc_router_device"

    CLICKHOUSE_HOST = "172.20.151.175"
    CLICKHOUSE_URL = "http://{}:8123".format(CLICKHOUSE_HOST)
    CLICKHOUSE_PORT = 9000
    CLICKHOUSE_USER = "life_assistant_data"
    CLICKHOUSE_PASSWORD = "qZmtqgmqq"
    CLICKHOUSE_DATABASE = "proactive_service_data"
    # CLICKHOUSE_TABLE = "life_time"

    PROACTIVE_SERVICE_URI = "http://beta-life-assistant.skysrt.com"
    BATCH_SAVE_MOBILE_MAC = "{}/conf/mobile/mac/saveBatch".format(PROACTIVE_SERVICE_URI)
    BATCH_SAVE_LITE_TIME = "{}/conf/life/time/saveBatch".format(PROACTIVE_SERVICE_URI)




